{include file="public/head" title="订单" keywords="订单" description="订单" /}
<style>
    .chongzhi_s1 button{
        border:none;
        background-color: #fff;
        border-right: 1px solid #f2f2f2;
    }
    .action{
        border-bottom: 1px;
        border-bottom-color:rgb(246, 115, 85);
    }
    .order-info{
        float: left;
        margin-top: 0.6rem;
        width: 100%;
    }
    .order-info li{
        display: block;
        float: left;
        font-size: 0.5rem;
        height: 1.6rem;
        line-height: 1.6rem;
    }
    .order-info .img{
        display: block;
        width: 80px;
        height: 80px;
        margin-left: -1.7rem;
    }
    .order-info .title{

        border-bottom:none;
    }
    .order-info .shuxing{
        clear: both;
        width: 100%;
        /*margin-left: 85px;*/
        border-bottom: 1px solid #efefef;
    }
    .order-info .order-price span{
        display: block;
        float: right;
        margin-top: -1.5rem;
        /*width: 1rem;*/
    }
    .order-info .zongjia{
        display: block;
        text-align: right;
        width:100%;
        padding:0;
        border-bottom: none;
        margin-top: -1.4rem;
    }
     #submit,#submits,#topay,#del{
         display: block;
         width: 4.5rem;
         height: 1.2rem;
         border: 1px solid #01cebf;
         border-radius: 15px;
         font-size: 0.75rem;
         text-align: center;
         margin-left: 5%;
         color:#01cebf ;
         background-color: #fff;
         line-height: 0rem;
         margin-top: -0.101rem;
         float: right;
     }
</style>
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
    <!-- 菜单容器 -->

    <div class="mui-inner-wrap">
        <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
            <div class="mui-scroll">
                <header class="tx_head">
                    <p>
                        <a href="{:url('index')}" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
                    <h5>我的维修记录</h5>

                    </p>
                </header>
                <main class="wdzh_main">
                    <section class="wdzh_main_section1">
                        <div style="{if condition='$type eq 0'}border-bottom: 1px solid #01cebf {/if}">
                            <a href="{:url('Account/hasoerder')}"><div>

                                <p class="tbp">全部</p>
                            </div></a>
                        </div>
                        <div style="{if condition='$type eq 1'}border-bottom: 1px solid #01cebf {/if}">
                            <a href="{:url('Account/hasoerder',['type'=>1])}"><div>

                                <p class="tbp">待维修</p>
                            </div></a>
                        </div>
                        <div style="{if condition='$type eq 2'}border-bottom: 1px solid #01cebf {/if}">
                            <a href="{:url('Account/hasoerder',['type'=>2])}"><div>

                                <p class="tbp" style="margin-top: -3px;">已完成</p>
                            </div></a>
                        </div>

                        <div style="{if condition='$type eq 3'}border-bottom: 1px solid #01cebf {/if}">
                            <a href="{:url('Account/hasoerder',['type'=>3])}"><div>

                                <p class="tbp" style="margin-top: -3px;">已转出</p>
                            </div></a>
                        </div>
                        <div style="{if condition='$type eq 4'}border-bottom: 1px solid #01cebf {/if}">
                            <a href="{:url('Account/hasoerder',['type'=>4])}"><div>

                                <p class="tbp" style="margin-top: -3px;">已取消</p>
                            </div></a>
                        </div>
                    </section>
                    <section class="wyty_section2 line">
                        {empty name="all"}
                        <div style="text-align: center;margin-top: 10px;">暂无数据......</div>
                        {else /}
                        {volist name="all" id="v"}
                        <ul class="jyjl_ul">
                            <li class="jyjl_li" style="border-bottom: 7px solid #f3f3f3;line-height: 0;height: 10.8rem;">
                                <div class="order-info">
                                    <ul>
                                        <li class="title" style="clear: both;border-bottom: 1px solid #efefef;width: 100%;line-height: 2.7rem;font-size: 0.8rem;  height: 2.7rem;">
                                            订单编号:{$v.order_mun} <span style="float: right">{$v.addtime|date="Y-m-d H:i:s",###}</span>
                                        </li>
                                        <li class="title" style="font-size: 0.8rem;">
                                            {$v.goods_name}
                                        </li>
                                        <li class="shuxing">
                                            <!--属性属性啊属性-->
                                        </li>
                                        <li class="order-price" style="font-size: 0.8rem;" >
                                            <span  data-src="tel:{$v.phone}">{$v.name}[<a href="tel:{$v.phone}" style="color: #01cebf">{$v.phone}</a>]</span>
                                        </li>
                                        <li class="zongjia" style="font-size: 0.8rem;" >
                                            <span style="float: left;margin-top: 0.4rem;">地址:{$v.addr}</span>

                                            <!--<span style="margin-top: -1.8rem;">总价:{$v.price * $v.munber}元{$v.type}</span>-->

                                        </li>
<<<<<<< HEAD
                                        <li style="clear: both; line-height: 1.6rem;padding-right: 30px">
=======
                                        <li style="clear: both; line-height: 1.6rem;width: 100%;padding-top: 8px">
>>>>>>> 98b4d510f6bc858c89e59222fbe93ccf103e8629
                                            {if condition="$v.types eq 1"}
                                            <!--<span data-src="{:url('addweixiou',['id'=>$v.id])}" style="    margin-top: 2.23rem;" >-->
                                                <!--<a href="{:url('addweixiou',['id'=>$v.id])}" style="color:  #01cebf">-->
                                                <!--<span class="topay"  style="margin-top: 0.4rem;float: left" >维修清单</span>-->
                                                <!--</a>-->
                                            <!--</span>-->

<<<<<<< HEAD
                                            <div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;margin-right: -23rem;">
                                                <button type="button" id="topay"  data-id="{$v.order_mun}" >完成订单</button>
                                            </div>
                                            <div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;margin-right: -18rem;">
                                                <button type="button" id="submit"  data-id="{$v.order_mun}" >转让订单</button>
                                            </div>
                                            <div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;    margin-right: -12rem;">
                                                <button type="button" id="submits" data-id="{$v.order_mun}" style="margin-right: -1rem;">取消订单</button>
                                            </div>
=======
                                            <!--<div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;margin-right: -23rem;">-->
                                                <button type="button" id="topay"  data-id="{$v.order_mun}" >维修清单</button>
                                            <!--</div>-->
                                            <!--<div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;margin-right: -18rem;">-->
                                                <button type="button" id="submit"  data-id="{$v.order_mun}" >分配订单</button>
                                            <!--</div>-->
                                            <!--<div style="height: 1.68rem;line-height: 1.68rem;padding: 10px;float: right;    margin-right: -12rem;">-->
                                                <button type="button" id="submits" data-id="{$v.order_mun}" >取消订单</button>
                                            <!--</div>-->
>>>>>>> 98b4d510f6bc858c89e59222fbe93ccf103e8629
                                            {/if}
                                        </li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                        {/volist}
                        <!-- 分页 (调取通用方法)-->
                        {/empty}
                    </section>


                </main>
                <br>
                <br>
                <br>
            </div>
        </div>
        <div class="mui-off-canvas-backdrop"></div>
    </div>
</div>
{include file="public/footer"}

</body>
<script type="text/javascript" charset="utf-8">
    mui.init({
        swipeBack: true //启用右滑关闭功能
    });
    document.getElementById("topay").addEventListener('tap', function() {
        var id =$('#topay').attr('data-id');
        window.location.href = '/index/account/addweixiou?id='+id;
    })
    document.getElementById("submit").addEventListener('tap', function() {
        var btnArray = ['否', '是'];
        mui.confirm('这会将此订单转让给他人，确认？', '', btnArray, function(e) {
            if (e.index == 1) {
                //订单id
                var  id = $("#submit").attr('data-id');
                window.location.href = "/index/account/touserorder?id="+id;
//                $.get("{:url('/index/account/touserorder')}", {'id' : id}, function(res){
//                    if(1 == res.code){
//                        layer.msg(res.msg, {icon: 1,time:1200}, function(){
//                        window.location.reload();
//                        });
//                    }else{
//                        layer.alert(res.msg, {icon: 2,time:1200});
//                    }
//                });
            } else {
//                alert('否')
            }
        })
    });

    document.getElementById("submits").addEventListener('tap', function() {
        var  id = $("#submit").attr('data-id');
        window.location.href = "/index/account/todelorder?id="+id;

//        var btnArray = ['否', '是'];
//        mui.confirm('取消订单，确认？', '', btnArray, function(e) {
//            if (e.index == 1) {
//                //订单id
//                var  id = $("#submit").attr('data-id');
//                $.get("{:url('/index/account/todelorder')}", {'id' : id}, function(res){
//                    if(1 == res.code){
//                        layer.msg(res.msg, {icon: 1,time:1200}, function(){
//                        window.location.reload();
//                        });
//                    }else{
//                        layer.alert(res.msg, {title: '友情提示', icon: 2});
//                    }
//                });
//            } else {
////                alert('否')
//            }
//        })
    });
</script>
</html>